Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createSystemRandom #22

Merged
merged 1 commit into from Sep 11, 2013
Merged

createSystemRandom #22

merged 1 commit into from Sep 11, 2013

Conversation

snoyberg
Copy link
Contributor

The use case for this is when it's inconvenient to have to restructure your code to live inside withSystemRandom. I original wrote the attached implementation in my own code and then created this pull request. However, once I looked at the code for withSystemRandom, it looks like it would be safe to reimplement createSystemRandom as:

createSystemRandom :: IO GenIO
createSystemRandom = withSystemRandom (return :: GenIO -> IO GenIO)

If my understanding is correct, I can update this pull request to use that implementation instead.

@Shimuuar
Copy link
Collaborator

+1 I wrote similar code on several occasions. And yes function in comment is correct

@bos
Copy link
Collaborator

bos commented Sep 10, 2013

Go ahead and redo it, and I'll apply it. Thanks.

@snoyberg
Copy link
Contributor Author

Pull request updated.

@Shimuuar Shimuuar merged commit ba28737 into haskell:master Sep 11, 2013
@Shimuuar
Copy link
Collaborator

Merged.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants